PUT THE VALUE OF ((CARD FIELD P)^2) INTO CARD FIELD PP
PUT THE VALUE OF (2*(CARD FIELD P)*(CARD FIELD Q)) INTO CARD FIELD PQ
PUT THE VALUE OF (((CARD FIELD Q)^2) * (1 - CARD FIELD S)) INTO CARD FIELD QQ
PUT THE VALUE OF (CARD FIELD PP + CARD FIELD PQ + CARD FIELD QQ) INTO SUM
PUT THE VALUE OF (CARD FIELD PP + (CARD FIELD P * CARD FIELD Q)) / SUM INTO INTP
PUT THE VALUE OF (CARD FIELD QQ + (CARD FIELD P * CARD FIELD Q)) / SUM INTO INTQ
PUT THE VALUE OF INTP INTO CARD FIELD P
PUT THE VALUE OF INTQ INTO CARD FIELD Q
ADD 1 TO CARD FIELD GEN
PUT THE VALUE OF CARD FIELD GEN INTO GENT
CHOOSE PENCIL TOOL
SET LINESIZE TO 1
set the numberFormat to "000"
PUT (200 - (200 * (THE VALUE OF CARD FIELD PP * .9))) INTO IT
CLICK AT (300 + GENT),trunc (IT)
PUT (200 - (200 * (THE VALUE OF CARD FIELD PQ * .9))) INTO IT
CLICK AT (300 + GENT),trunc (IT)
PUT (200 - (200 * (THE VALUE OF CARD FIELD QQ * .9))) INTO IT
CLICK AT (300 + GENT),trunc (IT)
set the numberFormat to ".0000"
END REPEAT
CHOOSE BROWSE TOOL
end mouseUp
-- part 9 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=408 top=317 right=339 bottom=508
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: CLEAR
----- HyperTalk script -----
on mouseUp
DELETE LINE 1 OF CARD FIELD P
DELETE LINE 1 OF CARD FIELD Q
DELETE LINE 1 OF CARD FIELD S
DELETE LINE 1 OF CARD FIELD PP
DELETE LINE 1 OF CARD FIELD PQ
DELETE LINE 1 OF CARD FIELD QQ
DELETE LINE 1 OF CARD FIELD GEN
choose select tool
drag from 300,21 to 507,200
doMenu "Pickup"
choose browse tool
GET THE LOCATION OF CARD FIELD P
CLICK AT IT
end mouseUp
-- part 11 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=205 top=315 right=337 bottom=256
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: NEXT
----- HyperTalk script -----
on mouseUp
go to next card
end mouseUp
-- part 12 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=149 top=314 right=337 bottom=199
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: PREV.
----- HyperTalk script -----
on mouseUp
go back
end mouseUp
-- part 14 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=273 top=316 right=338 bottom=373
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: COPY GRAPH
----- HyperTalk script -----
on mouseUp
choose select tool
drag from 260,18 to 508,219
doMenu "Copy Picture"
doMenu "Scrapbook"
doMenu "Paste Picture"
choose browse tool
end mouseUp
-- part contents for background part 1
----- text -----
HARDY-WEINBERG
-- part contents for background part 2
----- text -----
This card executes the Hardy-Weinberg function. Before making a run click on the CLEAR button. You will be prompted to enter a value in the box marked P. It should be a decimal value representing the frequency of the dominant gene in the population. Hit the TAB key after entering the P value and you will be prompted to enter a value for Q, the recessive gene. Note that the sum of P + Q = 1 therefore if you enter .4 for the value of P then Q must be .6. Hit the TAB key and you will be prompted to enter a selection coefficient. If the homozygous recessive gene is 100% lethal, then enter 1. If only half of the individuals with the homozygous condition die, then enter .5. If the gene in question kills no individuals, then enter 0. Click on the RUN button. The changing frequency of the homozygous dominant phenotype, (PP) will appear in the window marked (PP). The heterozygote phenotypes will appear in the window marked (PQ) and the homozygous recessive phenotype frequencies will appear in the window marked (QQ). The frequency of each phenotype will be simultaneously tracked on the graph above. If you wish to change the selection coefficient at some point in the run, simultaneously hit [CONTROL] and the [.] keys. Get back into the BROWSE mode and then simply move the cursor to the window marked S and click. Delete the value therein and enter your new value. For starters, you can experiment with the following data:
TRIAL P freq. Q freq. S
1. .6 .4 0
2. .6 .4 .2
3. .6 .4 .4
4. .6 .4 .8
5. .6 .4 1
6. .9 .1 .4
7. .1 .9 .4
From the data obtained in these runs, you can answer the following questions. (Note... use the disk. Simply click just to the right of the answer colon and begin typing.
1. At what point in the course of this population's evolution was selection most effective?
ANSWER:
2. Which is more effective in keeping recessive genes in a population, a low selection coefficient or a high starting frequency for the recessive gene? Does it matter?
ANSWER:
3. No matter how large the selection coefficient, recessive genes are never completely eliminated from the population... thus the asymptotic curves seen in the graph. Where are the recessive genes stored or kept in order for them to keep appearing generation after generation?
ANSWER:
4. No matter how low the recessive gene frequency in a population, if it is not being selected against by any factor, what will be the frequency of such a gene 25 or so generations into the future.
ANSWER:
When you have completed this card, flip to the next card for a consideration of random sampling errors.